<?php
/**
 * Created by PhpStorm.
 * @auth:Eddy
 * @527084800@qq.com
 * Date: 2018/7/5 0005
 */

namespace app\v1\controller;

use think\Db;

header('Access-Control-Allow-Origin:*');            // 处理vue跨域问题
class Index
{
    public function index()
    {
        $list = Db::name('article')->select();
        return json($list);
    }
}